<?php
namespace app\api\controller\v1;

use help\IpHelp;
use think\facade\Cache;
use app\providers\BaseController;
use app\resources\tasks\PushTask;
use app\resources\model\WebSocket;
use hg\apidoc\annotation as Apidoc;
use app\resources\service\FrpsService;
use app\resources\service\NodeService;
use app\resources\model\Frps as FrpsModel;

/**
 * @Apidoc\Title("frp管理")
 * @Apidoc\Group("buss")
 * @Apidoc\Sort(1)
 */
class Frps extends BaseController
{
    /**
     * @Apidoc\Title("获取通道列表")
     * @Apidoc\Desc("获取frps")
     * @Apidoc\Param("username", type="abc",require=true,default="1", desc="用户名")
     * @Apidoc\ParamType("formdata")
     * 
     */
	public function List(FrpsService $service)
    {
        // 发送cmd
        $result = $service->createFrps([
            'nid'=>6,
            'ddd'=>1
        ]);
        return \Api::ReSucess($result);	
	}

    /**
     * @Apidoc\Title("删除")
     * @Apidoc\Desc("获取frps")
     * @Apidoc\Param("fid", type="int",require=true,default="1", desc="fid")
     * @Apidoc\ParamType("formdata")
     * 
     */
	public function del(FrpsService $service)
    {
        $result = $service->deleteFrps(input('fid',0));
        return \Api::ReSucess($result);	
	}

}